<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>eRPC Generator (erpcgen): EnumType.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">eRPC Generator (erpcgen)
   &#160;<span id="projectnumber">Rev. 1.7.4</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_enum_type_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">EnumType.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2014, Freescale Semiconductor, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright 2016 NXP</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef _EMBEDDED_RPC__ENUMTYPE_H_</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define _EMBEDDED_RPC__ENUMTYPE_H_</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;DataType.h&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;EnumMember.h&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">// Classes</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceerpcgen.html">erpcgen</a> {</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_enum_type.html">   27</a></span>&#160;<span class="keyword">class </span><a class="code" href="classerpcgen_1_1_enum_type.html">EnumType</a> : <span class="keyword">public</span> <a class="code" href="classerpcgen_1_1_data_type.html">DataType</a></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;{</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_enum_type.html#a1793ed54d339fc34a338a041142ba268">   30</a></span>&#160;    <span class="keyword">typedef</span> std::vector&lt;EnumMember *&gt; <a class="code" href="classerpcgen_1_1_enum_type.html#a1793ed54d339fc34a338a041142ba268">member_vector_t</a>; </div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_enum_type.html#a36448a5e34e4a4ce526518c3f688e8b9">   39</a></span>&#160;    <a class="code" href="classerpcgen_1_1_enum_type.html#a36448a5e34e4a4ce526518c3f688e8b9">EnumType</a>(<span class="keyword">const</span> <a class="code" href="classerpcgen_1_1_token.html">Token</a> &amp;tok)</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    : <a class="code" href="classerpcgen_1_1_data_type.html">DataType</a>(tok, kEnumType, kEnumTypeSymbol)</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    {</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    }</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_enum_type.html#a26cc67a6270d6d4b1325b6e845c2dc9c">   49</a></span>&#160;    <a class="code" href="classerpcgen_1_1_enum_type.html#a26cc67a6270d6d4b1325b6e845c2dc9c">EnumType</a>()</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    : <a class="code" href="classerpcgen_1_1_data_type.html">DataType</a>(<span class="stringliteral">&quot;&quot;</span>, kEnumType, kEnumTypeSymbol)</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    }</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classerpcgen_1_1_enum_type.html#a4c97d8257933bcc596c79cb72d948444">addMember</a>(<a class="code" href="classerpcgen_1_1_enum_member.html">EnumMember</a> *newMember);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_enum_type.html#a3937f8b85c8a02780bb6e0ddbd945a03">   68</a></span>&#160;    member_vector_t &amp;<a class="code" href="classerpcgen_1_1_enum_type.html#a3937f8b85c8a02780bb6e0ddbd945a03">getMembers</a>() { <span class="keywordflow">return</span> <a class="code" href="classerpcgen_1_1_enum_type.html#af6f2cab0f34c476270c66ac100674dfb">m_members</a>; }</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <a class="code" href="classerpcgen_1_1_enum_member.html">EnumMember</a> *<a class="code" href="classerpcgen_1_1_enum_type.html#a8c218f5df40c18eb9856ec51387d71c4">getMember</a>(std::string name);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_enum_type.html#aa8ae9ac9e72a4eb3325775d767f31e2d">   82</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classerpcgen_1_1_enum_type.html#aa8ae9ac9e72a4eb3325775d767f31e2d">isEnum</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">true</span>; }</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_enum_type.html#a6a9782db4697448eb895f2b48afa0200">   89</a></span>&#160;    uint32_t <a class="code" href="classerpcgen_1_1_enum_type.html#a6a9782db4697448eb895f2b48afa0200">getNextValue</a>() { <span class="keywordflow">return</span> <a class="code" href="classerpcgen_1_1_enum_type.html#a3db07f7a0f619fafaa0f5cbaaa051f6d">m_currentValue</a>++; }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_enum_type.html#a72943e18405ea45b5ab018bcc86e75da">   96</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classerpcgen_1_1_enum_type.html#a72943e18405ea45b5ab018bcc86e75da">setCurrentValue</a>(uint32_t value) { <a class="code" href="classerpcgen_1_1_enum_type.html#a3db07f7a0f619fafaa0f5cbaaa051f6d">m_currentValue</a> = value; }</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keyword">virtual</span> std::string <a class="code" href="classerpcgen_1_1_enum_type.html#ab95b28ad62ecb25638468b2ba7783921">getDescription</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_enum_type.html#af6f2cab0f34c476270c66ac100674dfb">  115</a></span>&#160;    member_vector_t <a class="code" href="classerpcgen_1_1_enum_type.html#af6f2cab0f34c476270c66ac100674dfb">m_members</a>;   </div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="classerpcgen_1_1_enum_type.html#a3db07f7a0f619fafaa0f5cbaaa051f6d">  116</a></span>&#160;    uint32_t <a class="code" href="classerpcgen_1_1_enum_type.html#a3db07f7a0f619fafaa0f5cbaaa051f6d">m_currentValue</a> = 0; </div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;};</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;} <span class="comment">// namespace erpcgen</span></div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="preprocessor">#endif // _EMBEDDED_RPC__ENUMTYPE_H_</span></div><div class="ttc" id="classerpcgen_1_1_enum_type_html_a6a9782db4697448eb895f2b48afa0200"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#a6a9782db4697448eb895f2b48afa0200">erpcgen::EnumType::getNextValue</a></div><div class="ttdeci">uint32_t getNextValue()</div><div class="ttdoc">This function returns the next value to use for an enum member. </div><div class="ttdef"><b>Definition:</b> EnumType.h:89</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_a1793ed54d339fc34a338a041142ba268"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#a1793ed54d339fc34a338a041142ba268">erpcgen::EnumType::member_vector_t</a></div><div class="ttdeci">std::vector&lt; EnumMember * &gt; member_vector_t</div><div class="ttdef"><b>Definition:</b> EnumType.h:30</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_af6f2cab0f34c476270c66ac100674dfb"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#af6f2cab0f34c476270c66ac100674dfb">erpcgen::EnumType::m_members</a></div><div class="ttdeci">member_vector_t m_members</div><div class="ttdef"><b>Definition:</b> EnumType.h:115</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_aa8ae9ac9e72a4eb3325775d767f31e2d"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#aa8ae9ac9e72a4eb3325775d767f31e2d">erpcgen::EnumType::isEnum</a></div><div class="ttdeci">virtual bool isEnum() const </div><div class="ttdoc">This function return &quot;true&quot; value for identify enum type. </div><div class="ttdef"><b>Definition:</b> EnumType.h:82</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_a4c97d8257933bcc596c79cb72d948444"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#a4c97d8257933bcc596c79cb72d948444">erpcgen::EnumType::addMember</a></div><div class="ttdeci">void addMember(EnumMember *newMember)</div><div class="ttdoc">This function will add enum member to the enum. </div><div class="ttdef"><b>Definition:</b> Type.cpp:357</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_a36448a5e34e4a4ce526518c3f688e8b9"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#a36448a5e34e4a4ce526518c3f688e8b9">erpcgen::EnumType::EnumType</a></div><div class="ttdeci">EnumType(const Token &amp;tok)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> EnumType.h:39</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_a3db07f7a0f619fafaa0f5cbaaa051f6d"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#a3db07f7a0f619fafaa0f5cbaaa051f6d">erpcgen::EnumType::m_currentValue</a></div><div class="ttdeci">uint32_t m_currentValue</div><div class="ttdef"><b>Definition:</b> EnumType.h:116</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_ab95b28ad62ecb25638468b2ba7783921"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#ab95b28ad62ecb25638468b2ba7783921">erpcgen::EnumType::getDescription</a></div><div class="ttdeci">virtual std::string getDescription() const </div><div class="ttdoc">This function returns description about the enum. </div><div class="ttdef"><b>Definition:</b> Type.cpp:363</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_a26cc67a6270d6d4b1325b6e845c2dc9c"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#a26cc67a6270d6d4b1325b6e845c2dc9c">erpcgen::EnumType::EnumType</a></div><div class="ttdeci">EnumType()</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> EnumType.h:49</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_member_html"><div class="ttname"><a href="classerpcgen_1_1_enum_member.html">erpcgen::EnumMember</a></div><div class="ttdoc">Member of a enum. </div><div class="ttdef"><b>Definition:</b> EnumMember.h:25</div></div>
<div class="ttc" id="classerpcgen_1_1_data_type_html"><div class="ttname"><a href="classerpcgen_1_1_data_type.html">erpcgen::DataType</a></div><div class="ttdoc">Base class for data types. </div><div class="ttdef"><b>Definition:</b> DataType.h:25</div></div>
<div class="ttc" id="classerpcgen_1_1_token_html"><div class="ttname"><a href="classerpcgen_1_1_token.html">erpcgen::Token</a></div><div class="ttdoc">Encapsulates all information about a token. </div><div class="ttdef"><b>Definition:</b> Token.h:60</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html">erpcgen::EnumType</a></div><div class="ttdoc">Enumerate data type. </div><div class="ttdef"><b>Definition:</b> EnumType.h:27</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_a3937f8b85c8a02780bb6e0ddbd945a03"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#a3937f8b85c8a02780bb6e0ddbd945a03">erpcgen::EnumType::getMembers</a></div><div class="ttdeci">member_vector_t &amp; getMembers()</div><div class="ttdoc">This function returns vector of enum members. </div><div class="ttdef"><b>Definition:</b> EnumType.h:68</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_a72943e18405ea45b5ab018bcc86e75da"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#a72943e18405ea45b5ab018bcc86e75da">erpcgen::EnumType::setCurrentValue</a></div><div class="ttdeci">void setCurrentValue(uint32_t value)</div><div class="ttdoc">This function set current value. </div><div class="ttdef"><b>Definition:</b> EnumType.h:96</div></div>
<div class="ttc" id="namespaceerpcgen_html"><div class="ttname"><a href="namespaceerpcgen.html">erpcgen</a></div><div class="ttdef"><b>Definition:</b> AstNode.h:25</div></div>
<div class="ttc" id="classerpcgen_1_1_enum_type_html_a8c218f5df40c18eb9856ec51387d71c4"><div class="ttname"><a href="classerpcgen_1_1_enum_type.html#a8c218f5df40c18eb9856ec51387d71c4">erpcgen::EnumType::getMember</a></div><div class="ttdeci">EnumMember * getMember(std::string name)</div><div class="ttdoc">This function returns enum member based on given name. </div><div class="ttdef"><b>Definition:</b> Type.cpp:345</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">Copyright 2016-2020 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
